home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / applied / heart_beat < prev    next >
Text File  |  2001-06-04  |  1KB  |  37 lines

  1. SYNOPSIS
  2.         void heart_beat()
  3.  
  4. DESCRIPTION
  5.         This function will be called automatically every 2 seconds.
  6.         The start and stop of heart beat is controlled by the efun
  7.         set_heart_beat(). Be careful not to have objects with heart
  8.         beat running all the time, as it uses a lot of driver
  9.         resources. If there is an error in the heart beat routine, the
  10.         heart beat will be turned off until this object is recompiled,
  11.         and can not be restarted with set_heart_beat(). The function
  12.         this_player() will return this object, but only if it is
  13.         living. Otherwise, this_player() will return 0.
  14.         
  15.         The function will be called only if there is at least one interactive
  16.         user in the game.
  17.  
  18.         Note that error messages will be given to the current user
  19.         which will be the object itself or nobody.
  20.  
  21. EXAMPLE
  22.         object owner;
  23.         void create() {
  24.            ...
  25.            owner=this_player();
  26.            set_heart_beat(1);
  27.         }
  28.         void heart_beat() {
  29.            tell_object(owner, "Your heart goes: BUM BUM\n");
  30.         }
  31.         
  32.         We have to use tell_object() because write goes to the current
  33.         user and this can only be the object itself or nobody.
  34.  
  35. SEE ALSO
  36.         set_heart_beat(E), call_out(E), enable_commands(E)
  37.